<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../js/utils/rem.js"></script>
    <link rel="stylesheet" href="https://at.alicdn.com/t/c/font_2124975_ogwnuct6mbe.css">
    <link rel="stylesheet" href="../css/public/hea.css">
    <link rel="stylesheet" href="../css/page/Search.css">
    <style>
        .her{
            width: 100%;
            height: 1rem;
            position: fixed;
            top: 0;
            left: 0;
            background-color: var(--themeColor);
            box-sizing: border-box;
            z-index: 9999;
            display: flex;
            align-items: center;
        }
        .her i{
            font-size: var(--f20);
            margin: 0 0.2rem;
        }
        .her input{
            height: 0.6rem;
            flex: 1;
            border-radius :0.5rem;;
            font-size: var(--f15);
        }
        .her i:nth-child(1){
            
        }
        .her i:nth-child(2){}
    </style>
</head>
<body>
    <div class="her">
        <i class="iconfont icon-back1 dddd1"></i>
        <input type="text">
        <i class="iconfont icon-search dddd"></i>
    </div>
    <div class="swiper-wrapper ">
        <ul class="swiper-slide1" style="margin-top: 1.1rem;">

        </ul>
    </div>
</body>
<script src="../js/config/index.js"></script>
<script src="../js/http/index.js"></script>
<script src="../js/serve/index.js"></script>
<script src="../js/utils/index.js"></script>
<script>
    class Search{
        constructor(){
            this.search()
        }
        text=null
        async search(){
            
            $(".dddd").tap(({v,i})=>{
                this.text=document.querySelector('input').value;
                ddf()
                
            })
            // encodeURIComponent
            let ddf=async ()=>{
                let ddd= await indexserve.search({
                    keyword:decodeURIComponent(this.text),
                    page:1
                })
                item($(".swiper-slide1"), ddd.result,2)
                clicka(".swiper-slide1 li a",ddd.result,"detail.html")
                console.log(ddd)
            }

            $(".dddd1").tap(()=>{
                history.back()
            })
            
            
        }

    }
    new Search()
</script>
</html>